<?php
$app = \Realisation\App::getInstance();
$env = $app['debug']? 'dev' : 'prod';
$app->register(new Silex\Provider\MonologServiceProvider(), array(
    'monolog.logfile' => sprintf(__DIR__.'/../logs/%s.log', $env),
    'monolog.name' => 'aggregator',
    'monolog.level' => $app['debug']? \Monolog\Logger::DEBUG : \Monolog\Logger::INFO,
));

$app['monolog'] = $app->share($app->extend('monolog', function($monolog, $app) {
    return $monolog;
}));
